<template lang="pug">
.bg
  h1 深圳杰恩创意设计--供应商综合能力调查表
  .content
    h3 供应商综合能力调查
    .module
      .t-title
        span.t-icon
        span 供应商（制造商）概况
        span.line
      .main
        el-form(ref="form" :model="form" :rules="rules" label-width="200px" padding:0  label-position="right" class="el-form")       
          el-form-item(label="您的公司全称：" prop="companyName" class="el-form-item")
            el-input(placeholder="请输入您的公司全称" v-model="form.companyName")
          el-form-item(label="您公司的详细地址：" prop="region" )
            .el-form-select-bd
              .el-form-select-item
                el-select(placeholder="请选择省" v-model="form.province" @change="changeProvince")
                  el-option(v-for="item in provinces", :key="item.id", :label="item.name", :value="item.id")
              .el-form-select-item
                el-select(placeholder="请选择市" v-model="form.city" @change="changeCity")
                  el-option(v-for="item in citys", :key="item.id", :label="item.name", :value="item.id")
              .el-form-select-item
                el-select(placeholder="请选择区" v-model="form.region")
                  el-option(v-for="item in areas", :key="item.id", :label="item.name", :value="item.id")
            .el-form-select-textarea
              el-input(placeholder="请输入详细地址" v-model="form.detailAddress")
          .row
            el-form-item(label="您的公司电话：" prop="mobile" class="el-form-item-t")
              el-input(placeholder="请输入您的公司电话" v-model="form.mobile")
            el-form-item(label="您的公司电子邮箱：" prop="companyMail" class="el-form-item-t")
              el-input(placeholder="请输入您的公司电子邮箱" v-model="form.companyMail")
          el-form-item(label="您的公司网址：" prop="companyUrl" class="el-form-item-t")
            el-input(placeholder="请输入您的公司网址" v-model="form.companyUrl")
          .row
            el-form-item(label="您的企业负责人：" prop="personsInChargeOfCompany" class="el-form-item-t")
              el-input(placeholder="请输入您的企业负责人" v-model="form.personsInChargeOfCompany")
            el-form-item(label="您的企业负责人电话/邮箱：" prop="personsInChargeOfCompanyPhoneAndMail" class="el-form-item-t")
              el-input(placeholder="请输入您的企业负责人电话/邮箱" v-model="form.personsInChargeOfCompanyPhoneAndMail")  
          .row
            el-form-item(label="销售负责人（区域总监/销售经理）：" line-height="20px" label-height="40px" prop="saleInChargeOfCompany" class="el-form-item-t")
              el-input(placeholder="请输入销售负责人（区域总监/销售经理）" v-model="form.saleInChargeOfCompany")
            el-form-item(label="销售负责人（区域总监/销售经理）电话/邮箱：" prop="saleInChargeOfCompanyPhoneAndMail" class="el-form-item-t")
              el-input(placeholder="请输入销售负责人（区域总监/销售经理）电话/邮箱" v-model="form.saleInChargeOfCompanyPhoneAndMail")     
          .row
            el-form-item(label="质量负责人：" prop="qualityInChargeOfCompany" class="el-form-item-t")
              el-input(placeholder="请输入质量负责人" v-model="form.qualityInChargeOfCompany")
            el-form-item(label="质量负责人电话/邮箱：" prop="qualityInChargeOfCompanyPhoneAndMail" class="el-form-item-t")
              el-input(placeholder="请输入质量负责人电话/邮箱" v-model="form.qualityInChargeOfCompanyPhoneAndMail")
          .row
            el-form-item(label="业务联系人：" prop="headOfSales" class="el-form-item-t")
              el-input(placeholder="请输入业务联系人" v-model="form.headOfSales")
            el-form-item(label="业务联系人电话/邮箱：" prop="headOfSalesPhoneAndMail" class="el-form-item-t")
              el-input(placeholder="请输入业务联系人电话/邮箱" v-model="form.headOfSalesPhoneAndMail")
          .row
            el-form-item(label="注册资金：" prop="registeredFund" class="el-form-item-t")
              el-input(placeholder="请输入注册资金" v-model="form.registeredFund") 
                template(slot="append") 万元
            el-form-item(label="成立年月：" prop="companyCreateDate" class="el-form-item-t")
              el-date-picker(class="el-date" suffix-icon="el-icon-date" placeholder="请输入成立年月" :editable="false" v-model="form.companyCreateDate" format="yyyy-MM-dd" value-format="yyyy-MM-dd")
          .row
            el-form-item(label="企业性质：" prop="companyType" class="el-form-item-t")
              el-select(class="el-date" placeholder="请选择企业性质" v-model="form.companyType")
                //- el-option(v-for="item in companyTypeList" :key="item.styleId" :label="item.styleName" :value="item.dicTypeValue")
                el-option(label="国企" :value="1")
                el-option(label="股份制" :value="2")
                el-option(label="私企/集体" :value="3")
                el-option(label="中外合资" :value="4")
                el-option(label="外商独资" :value="5")
                el-option(label="其他" :value="6")
            el-form-item(label="是否为一般纳税人（单选） ：" prop="generalTaxpayer" class="el-form-item-t")
              el-radio-group(v-model="form.generalTaxpayer")
                el-radio(:label="1") 是
                el-radio(:label="2") 否
    .module
      .t-title
        span.t-icon
        span 供应商产品销售情况
        span.line
      .main  
        el-form(ref="form"  :model="form" :rules="rules" label-width="320px" padding:0  label-position="right" class="el-form")           
          el-form-item(label="经营的产品品牌：" prop="supplierBrand" class="el-form-item")
            el-input(placeholder="请输入经营的产品品牌" v-model="form.supplierBrand" type="textarea"  rows="3" resize="none") 
          el-form-item(label="主营产品介绍：" prop="productIntroduce" class="el-form-item")
            el-input(placeholder="请输入主营产品介绍" v-model="form.productIntroduce" type="textarea"  rows="3" resize="none") 
          el-form-item(label="请上传产品手册：" prop="productManualList" class="el-form-item") 
            .el-form-upload-bd  
              el-upload(
                class="upload-demo"
                action="#"
                :on-change="handleChange"
                :file-list="fileList"               
              )
                el-button(class="chooseBtn") 选择附件
                div(slot="tip" class="el-upload__tip") 支持格式： .doc .docx .pdf
          el-form-item(label="产品定位：" prop="productPositioning" class="el-form-item-t")
            el-checkbox-group(v-model="checkList")  
              el-checkbox(label="1") 进口
              el-checkbox(label="2") 高端
              el-checkbox(label="3") 中端
              el-checkbox(label="4") 性价比 
          .row    
            el-form-item(label="企业年销售额：" prop="productTotalSale" class="el-form-item-t")
              el-input(placeholder="请输入企业年销售额" v-model="form.productTotalSale") 
                template(slot="append") 万元              
            el-form-item(label="业务覆盖范围：" prop="businessCoverage" class="el-form-item-t")
              el-input(placeholder="请输入业务覆盖范围" v-model="form.businessCoverage") 
          el-form-item(label="是否进入深圳市建筑工务署（单选）:" prop="inDepartment" class="el-form-item-t")   
              el-radio-group(v-model="form.inDepartment")
                el-radio(:label="1") 是
                el-radio(:label="2") 正在办理   
                el-radio(:label="3") 否   
          el-form-item(label="所在甲方品牌库：" prop="partyABrand" class="el-form-item-tw")
            el-input(placeholder="请输入所在甲方品牌库,输入完成按回车键添加" v-model="form.partyABrand") 
            .brandNameList 
              span.nameList 甲方品牌库名称1            
              span.nameList {{form.partyABrand}}            
               
          el-form-item(label="所在甲方战采（集采）库：" prop="partyACollection" class="el-form-item-tw")
            el-input(placeholder="请输入所在甲方战采（集采）库,输入完成按回车键添加" v-model="form.partyACollection")   
            .brandNameList 
              span.nameList 所在甲方战采库名称1            
              span.nameList {{form.partyACollection}}

          el-form-item(label="所在施工单位品牌库：" prop="constructionBrand" class="el-form-item-tw")
            el-input(placeholder="请输入所在施工单位品牌库名称,输入完成按回车键添加" v-model="form.constructionBrand")   
            .brandNameList 
              span.nameList 所在施工单位品牌库名称1            
              span.nameList {{form.partyACollection}}             

          el-form-item(label="所在施工单位战采（集采）库" prop="constructionCollection" class="el-form-item-tw")
            el-input(
              class="input-new-tag" 
              v-model="inputValue" 
              ref="saveTagInput" 
              @keyup.enter.native="handleInputConfirm"
              @blur="handleInputConfirm"
              placeholder="请输入所在施工单位战采库名称,输入完成按回车键添加"
            )
            el-tag(
              :key="tag" 
              v-for="tag in dynamicTags" 
              closable :disable-transitions="false" 
              @close="handleClose(tag)"
            ) {{tag}}    
          .row
            el-form-item(label="一般交货期：" prop="deliveryDay" class="el-form-item-t")
              el-input(placeholder="请输入一般交货期" v-model="form.deliveryDay") 
                template(slot="append") 天              
            el-form-item(label="是否需要开票（单选）：" prop="needBilling" class="el-form-item-t")   
              el-radio-group(v-model="form.needBilling")
                el-radio(:label="1") 是
                el-radio(:label="2") 否

          el-form-item(label="产品应用领域及主要客户简要介绍：" prop="customerList" class="el-form-item-one")
            .header.flex
              span 客户名称 
              span 使用材料品种规格  
              span 年订货额（万元）
            .inputCont
              ul  
                li.flex 
                  el-input(placeholder="请输入客户名称" style="border-radius:0" class="clientInput") 
                  el-input(placeholder="请输入使用材料品种规格" style="border-radius:0" class="clientInput")
                  el-input(placeholder="请输入年订货额（万元）" style="border-radius:0" class="clientInput")  
                li.flex 
                  el-input(placeholder="请输入客户名称" style="height:40px;flex:1;color:#C0C4CC;" class="clientInput") 
                  el-input(placeholder="请输入使用材料品种规格" style="height:40px;flex:1;color:#C0C4CC;" class="clientInput")
                  el-input(placeholder="请输入年订货额（万元）" style="height:40px;flex:1;color:#C0C4CC;" class="clientInput")     
                li.flex 
                  el-input(placeholder="请输入客户名称" style="height:40px;flex:1;color:#C0C4CC;" class="clientInput") 
                  el-input(placeholder="请输入使用材料品种规格" style="height:40px;flex:1;color:#C0C4CC;" class="clientInput")
                  el-input(placeholder="请输入年订货额（万元）" style="height:40px;flex:1;color:#C0C4CC;" class="clientInput")
            el-button(class="addName") 添加
    .module
      .t-title
        span.t-icon
        span 供应商生产概况 
        span.line
      .main  
        el-form(ref="form"  :model="form" :rules="rules" label-width="320px" padding:0  label-position="right" class="el-form")           
          el-form-item(label="人力资源情况：" class="el-form-item-one" required)
            .header.flex
              span 员工总人数 
              span 管理人员人数  
              span 技术人员人数
              span 工人人数
            .inputCont
              ul  
                li.flex 
                  el-input(placeholder="请输入员工人数" v-model="form.totalEmployees" style="border-radius:0" class="clientInput") 
                    template(slot="append" style="border:none;") 人 
                  el-input(placeholder="请输入管理人员人数" v-model="form.management" style="border-radius:0" class="clientInput")
                    template(slot="append") 人
                  el-input(placeholder="请输入技术人员人数" v-model="form.management" style="border-radius:0" class="clientInput")  
                    template(slot="append") 人
                  el-input(placeholder="请输入工人人数" v-model="form.worker" style="border-radius:0" class="clientInput")  
                    template(slot="append") 人
          el-form-item(label="生产设备情况：" class="el-form-item-one" required)
            .header.flex
              span 设备总台（套）数 
              span 进口设备台（套）数 
              span 国产设备台（套）数
            .inputCont
              ul  
                li.flex 
                  el-input(placeholder="请输入数值" v-model="form.totalEquipmentNumber" style="border-radius:0" class="clientInput") 
                    template(slot="append" style="border:none;") 台（套）
                  el-input(placeholder="请输入数值" v-model="form.importedEquipmentNumber" style="border-radius:0" class="clientInput")
                    template(slot="append") 台（套）
                  el-input(placeholder="请输入数值" v-model="form.domesticNumber" style="border-radius:0" class="clientInput")  
                    template(slot="append") 台（套）        

          el-form-item(label="主要原材料名称及来源：" prop="materialOriginal" class="el-form-item")
            el-input(placeholder="请输入主要原材料名称及来源" v-model="form.materialOriginal" type="textarea"  rows="3" resize="none") 
          el-form-item(label="主要生产设备的名称、产地、价值：" prop="otherInformation" class="el-form-item")
            el-input(placeholder="请输入主要生产设备的名称、产地、价值" v-model="form.otherInformation" type="textarea"  rows="3" resize="none")                     
          .row    
            el-form-item(label="年生产产能：" prop="annualProductionCapacity" class="el-form-item-t")
              el-input(placeholder="请输入年生产产能：" v-model="form.annualProductionCapacity") 
                template(slot="append") 万元              
            el-form-item(label="新品研发能力：" prop="researchProductivity" class="el-form-item-t")   
              el-radio-group(v-model="form.researchProductivity" class="radio-group")
                el-radio(:label="1" class="radio")  能自行开发新产品
                el-radio(:label="2" class="radio") 只能开发简单产品
                el-radio(:label="3" class="radio") 没有开发能力

    .module
      .t-title
        span.t-icon
        span 质量保证能力 
        span.line
      .main  
        el-form(ref="form"  :model="form" :rules="rules" label-width="320px" padding:0  label-position="right" class="el-form")           
          el-form-item(label="质量、职业健康安全、环境管理体系的认证：" prop="authentication" class="el-form-item-tw")
            el-input(placeholder="请输入请输入认证鉴定/认证试验以及认证机构名称,输入完成按回车键添加" v-model="form.authentication")   
            .brandNameList 
              span.nameList 所在施工单位品牌库名称1            
              span.nameList {{form.partyACollection}} 
          el-form-item(label="质量、职业健康安全、环境管理体系的认证：" prop="authentication" class="el-form-item-tw" required)
            el-input(placeholder="请输入质量、职业健康安全、环境管理体系的认证" v-model="form.authentication") 
          el-form-item(label="工艺、质量文件：" prop="fileCompleted" class="el-form-item-t" required)   
              el-radio-group(v-model="form.fileCompleted")
                el-radio(:label="1") 齐全
                el-radio(:label="2") 有一部分 
                el-radio(:label="3") 没有 
          .row    
            el-form-item(label="质检机构名称：" prop="inspectionOrganizationName" class="el-form-item-t" required)
              el-input(placeholder="请输入质检机构名称" v-model="form.inspectionOrganizationName")  
            el-form-item(label="专职质量人员数：" prop="supplierQualificationNumber" class="el-form-item-t" required)
              el-input(placeholder="请输入专职质量人员数" v-model="form.supplierQualificationNumber")      
          
          el-form-item(label="主要检测试验设备情况：" class="el-form-item-one" )
            .header.flex
              span 设备总台（套）数
              span 进口设备台（套）数 
              span 国产设备台（套）数
              span 自制设备台（套）数
            .inputCont
              ul  
                li.flex 
                  el-input(placeholder="请输入数值" v-model="form.qualityTotalEquipmentNumber" style="border-radius:0" class="clientInput" required) 
                    template(slot="append" style="border:none;") 台（套）
                  el-input(placeholder="请输入数值" v-model="form.qualityImportedEquipmentNumber" style="border-radius:0" class="clientInput" required)
                    template(slot="append") 台（套）
                  el-input(placeholder="请输入数值" v-model="form.qualitySelfMadeEquipment" style="border-radius:0" class="clientInput" required)  
                    template(slot="append") 台（套） 
                  el-input(placeholder="请输入数值" v-model="form.qualityDomesticNumber" style="border-radius:0" class="clientInput" required)  
                    template(slot="append") 台（套）

          el-form-item(label="主要检测试验设备的名称、产地、价值：" prop="qualityOtherInformation" class="el-form-item")
            el-input(placeholder="请输入主要检测试验设备的名称、产地、价值" v-model="form.qualityOtherInformation" type="textarea"  rows="3" resize="none")  
    
    .module
      .t-title
        span.t-icon
        span 环境保护、社会责任、职业健康与安全体系
        span.line
      .main  
        el-form(ref="form"  :model="form" :rules="rules" label-width="320px" padding:0  label-position="right" class="el-form")        
          el-form-item(label="是否通过质量管理体系认证：" class="el-form-item-t" required)   
            el-radio-group(v-model="form.passedQualityCertification")
              el-radio(:label="1") 已通过
              el-radio(:label="2") 正在进行认证 
              el-radio(:label="3") 没有通过 
              el-radio(:label="4") 不了解此体系认证 
          el-form-item(label="相关报告及证书：" prop="inspectionOrganizationName" class="el-form-item-t") 
            .survey                  
              ali-upload(
                :multiple="true"
                accept="image/png, image/jpeg, image/jpg"
                ref="aliUpload",
                @getProgress="getProgress",
                @getUrl="getUrl"
                class="ali-upload"
                list-type="picture-card"
              )
                .survey-upload ＋上传图片 
              img(:src="imgs.fileUrl" class="avatar" )
      .main(style="margin-top:22px")  
        el-form(ref="form"  :model="form" :rules="rules" label-width="320px" padding:0  label-position="right" class="el-form")        
          el-form-item(label="是否通过职业健康安全管理体系认证：" prop="passedHealthCertification" class="el-form-item-t" required)   
            el-radio-group(v-model="form.passedHealthCertification")
              el-radio(:label="1") 已通过
              el-radio(:label="2") 正在进行认证 
              el-radio(:label="3") 没有通过 
              el-radio(:label="4") 不了解此体系认证 
          el-form-item(label="相关报告及证书：" class="el-form-item-t") 
            .survey                  
              ali-upload(
                :multiple="true"
                accept="image/png, image/jpeg, image/jpg"
                ref="aliUpload",
                @getProgress="getProgress",
                @getUrl="getUrl"
                class="ali-upload"
                list-type="picture-card"
              )
                .survey-upload ＋上传图片 
              img(:src="imgs.fileUrl" class="avatar" )
      .main(style="margin-top:22px")  
        el-form(ref="form"  :model="form" :rules="rules" label-width="320px" padding:0  label-position="right" class="el-form")        
          el-form-item(label="是否通过环境管理体系认证：" prop="passedEnvironmentCertification" class="el-form-item-t" required)   
            el-radio-group(v-model="form.passedEnvironmentCertification")
              el-radio(:label="1") 已通过
              el-radio(:label="2") 正在进行认证 
              el-radio(:label="3") 没有通过 
              el-radio(:label="4") 不了解此体系认证 
          el-form-item(label="相关报告及证书：" class="el-form-item-t") 
              .survey                  
                ali-upload(
                  :multiple="true"
                  accept="image/png, image/jpeg, image/jpg"
                  ref="aliUpload",
                  @getProgress="getProgress",
                  @getUrl="getUrl"
                  class="ali-upload"
                  list-type="picture-card"
                )
                  .survey-upload ＋上传图片 
                img(:src="imgs.fileUrl" class="avatar" )
    
    .module
      .t-title
        span.t-icon
        span 相关证书资料
        span.line
      .main  
        el-form(ref="form"  :model="form" :rules="rules" label-width="320px" padding:0  label-position="right" class="el-form")        
          el-form-item(label=" 营业执照（三证合一)：" prop="inspectionOrganizationName" class="el-form-item-t" required) 
            .survey                  
              ali-upload(
                :multiple="true"
                accept="image/png, image/jpeg, image/jpg"
                ref="aliUpload",
                @getProgress="getProgress",
                @getUrl="getUrl"
                class="ali-upload"
                list-type="picture-card"
              )
                .survey-upload ＋上传图片 
              img(:src="imgs.fileUrl" class="avatar" )
      .main(style="margin-top:22px")  
        el-form(ref="form"  :model="form" :rules="rules" label-width="320px" padding:0  label-position="right" class="el-form")         
          el-form-item(label="代理商（贸易商）需提供代理证书(可上传多张图片)：" class="el-form-item-t" required) 
            .survey                  
              ali-upload(
                :multiple="true"
                accept="image/png, image/jpeg, image/jpg"
                ref="aliUpload",
                @getProgress="getProgress",
                @getUrl="getUrl"
                class="ali-upload"
                list-type="picture-card"
              )
                .survey-upload ＋上传图片 
              img(:src="imgs.fileUrl" class="avatar" )
      
      .main(style="margin-top:22px")  
        el-form(ref="form"  :model="form" :rules="rules" label-width="320px" padding:0  label-position="right" class="el-form")  
          el-form-item(label="请上传公司简介：" prop="companyFileIds" class="el-form-item") 
            .el-form-upload-bd  
              el-upload(
                class="upload-demo"
                action="#"
                :on-change="handleChange"
                :file-list="fileList"               
              )
                el-button(class="chooseBtn" ) 选择附件
                div(slot="tip" class="el-upload__tip") 支持格式： .doc .docx .pdf
    .upload-footer
      el-button( @click="submit" class="upload-save") 提交入库申请
</template>

<script>
import { createSupplierStoragePage,supplierCheckIsExist,dropDownList } from 'api'
import aliUpload from "@/components/customUpload";
export default {
  name: "survey",
  components: {
    aliUpload,
  },
  data() {
    var validateAddress = (rule, value, callback) => {
      if (value === '') {
        callback(new Error('请先选择地址'))
      } else {
        if (!this.form.province || !this.form.city || !this.form.region) {
          callback(new Error('请先选择地址'))
        }
        callback()
      }
    }
    return {
      dynamicTags: [],
      inputVisible: false,
      inputValue: '',
      imgs: {
        fileUrl: "",
      },      
      knowledge: [
        { label: "品牌1" },
        { label: "品牌2" },
        { label: "品牌3" }
      ],
      form: {},
      checkList: [],
      fileList: [{
        name: 'food.jpeg',
        url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
      }, {
        name: 'food2.jpeg',
        url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
      }],
      provinces: [],
      citys: [],
      areas: [],
      form: {
        companyName: '',
        province: '',
        city: '',
        area:'',
        region: '',
        detailAddress: '',
        mobile:'',
        companyMail:'',
        companyUrl:'',
        personsInChargeOfCompany:'',
        personsInChargeOfCompanyPhoneAndMail:'',
        saleInChargeOfCompany:'',
        saleInChargeOfCompanyPhoneAndMail:'',
        qualityInChargeOfCompany:'',
        qualityInChargeOfCompanyPhoneAndMail:'',
        headOfSales:'',
        headOfSalesPhoneAndMail:'',
        supplierBrand:'',
        productIntroduce:'',
        productManualList:'',
        productPositioning:[],
        registeredFund:'',
        companyCreateDate:'',
        companyType:'',
        generalTaxpayer:'',
        supplierBrand:'',
        productIntroduce:'',
        productTotalSale:'',
        businessCoverage:'',
        inDepartment:'',
        partyABrand:[],
        partyACollection:[],
        constructionBrand:[],
        constructionCollection:[],
        deliveryDay:'',
        needBilling:'',
        customerList:[],
        customerName:'',
        specification:'',
        annualOrderAmount:'',
        totalEmployees:'',
        management:'',
        technician:'',
        worker:'',
        fixedAssets:'',
        materialOriginal:'',
        totalEquipmentNumber:'',
        importedEquipmentNumber:'',
        domesticNumber:'',
        otherInformation:'',
        annualProductionCapacity:'',
        researchProductivity:'',
        authentication:'',
        fileCompleted:'',
        inspectionOrganizationName:'',
        supplierQualificationNumber:'',
        qualityTotalEquipmentNumber:'',
        qualityImportedEquipmentNumber:'',
        qualitySelfMadeEquipment:'',
        qualityDomesticNumber:'',
        qualityOtherInformation:'',
        passedQualityCertification:'',
        passedHealthCertification:'',
        passedEnvironmentCertification:'',
        environmentCertificationFileIds:[],
        healthCertificationFileIds:[],
        certificationFileIds:[],
        businessLicenseFileIds:[],
        proxyCertificateFileIds:[],
        companyFileIds:[],         
      },
      rules: {
          companyName: [
            { required: true, message: '请输入您的公司全称', trigger: 'blur' }
          ],
          region: [
            { required: true, validator: validateAddress, trigger: 'change' }
          ],
          mobile: [
            { required: true, message: '请输入您的公司电话', trigger: 'blur' }
          ],  
          companyMail: [
            { required: true, message: '请输入您的公司电子邮箱', trigger: 'blur' }
          ],  
          companyUrl: [
            { required: true, message: '请输入您的公司网址', trigger: 'blur' }
          ],   
          personsInChargeOfCompany: [
            { required: true, message: '请输入您的企业负责人', trigger: 'blur' }
          ],  
          personsInChargeOfCompanyPhoneAndMail: [
            { required: true, message: '请输入您的企业负责人电话/邮箱', trigger: 'blur' }
          ],  
          saleInChargeOfCompany: [
            { required: true, message: '请输入销售负责人（区域总监/销售经理）', trigger: 'blur' }
          ],  
          saleInChargeOfCompanyPhoneAndMail: [
            { required: true, message: '请输入销售负责人（区域总监/销售经理）电话/邮箱', trigger: 'blur' }
          ],
          qualityInChargeOfCompany: [
            { required: true, message: '请输入质量负责人', trigger: 'blur' }
          ],  
          qualityInChargeOfCompanyPhoneAndMail: [
            { required: true, message: '请输入质量负责人电话/邮箱', trigger: 'blur' }
          ],
          headOfSales: [
            { required: true, message: '请输入业务联系人', trigger: 'blur' }
          ],  
          headOfSalesPhoneAndMail: [
            { required: true, message: '请输入业务联系人电话/邮箱', trigger: 'blur' }
          ],
          registeredFund: [
            { required: true, message: '请输入注册资金', trigger: 'blur' }
          ],  
          companyCreateDate: [
            { required: true, message: '请输入成立年月', trigger: 'blur' }
          ],
          companyType: [
            { required: true, message: '请选择企业性质', trigger: 'change' }
          ],  
          generalTaxpayer: [
            { required: true, message: '请选择否为一般纳税人 ', trigger: 'change' }
          ],
          supplierBrand: [
            { required: true, message: '请输入主要原材料名称及来源', trigger: 'blur' }
          ],
          productIntroduce: [
            { required: true, message: '请输入主营产品介绍', trigger: 'blur' }
          ],
          productTotalSale: [
            { required: true, message: '请输入企业年销售额', trigger: 'blur' }
          ],
          businessCoverage: [
            { required: true, message: '请输入业务覆盖范围', trigger: 'blur' }
          ],
          deliveryDay: [
            { required: true, message: '请输入企业年销售额', trigger: 'blur' }
          ],
          needBilling: [
            { required: true, message: '请选择是否需要开票 ', trigger: 'change'}
          ],          
          inDepartment: [
            { required: true, message: '请选择是否进入深圳市建筑工务署', trigger: 'change' }
          ],
          partyABrand: [
            { required: true, message: '请输入所在甲方品牌库 ', trigger: 'blur'}
          ],
          partyACollection: [
            { required: true, message: '请输入所在甲方战采（集采）库 ', trigger: 'blur'}
          ],          
          materialOriginal: [
            { required: true, message: '请输入主要原材料名称及来源 ', trigger: 'blur'}
          ],
          otherInformation: [
            { required: true, message: '请输入主要生产设备的名称、产地、价值 ', trigger: 'blur'}
          ],
          annualProductionCapacity: [
            { required: true, message: '请输入年生产产能 ', trigger: 'blur'}
          ],
          researchProductivity: [
            { required: true, message: '请选择新品研发能力',  trigger: 'change'}
          ],
          authentication:[
            { required: true, message: '请输入质量、职业健康安全、环境管理体系的认证', trigger: 'blur'}
          ],
          constructionBrand:[
            {required: true, message: '请输入所在施工单位品牌库', trigger: 'blur'}
          ],
          constructionCollection:[
            {required: true, message: '请输入所在施工单位战采（集采）库名称', trigger: 'blur'}
          ]
        },
    };
  },
  methods: {
    getProgress () {},
    handleClose(tag) {
      this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
    },
    showInput() {
      this.inputVisible = true;
      this.$nextTick(_ => {
        this.$refs.saveTagInput.$refs.input.focus();
      });
    },
    handleInputConfirm() {
      let inputValue = this.inputValue;
      if (inputValue) {
        this.dynamicTags.push(inputValue);
      }
      this.inputVisible = false;
      this.inputValue = '';
    },

    //提交申请入库
    async submit () {
      // try {
      //   let query = JSON.parse(JSON.stringify(this.currentSpecModel))
      //   query.value.items.forEach(item => {
      //     item.values.forEach(row => {
      //       row.image = ''
      //     })
      //   })
      //   query.value = JSON.stringify(query.value)
      //   await this.$axios.post(saveMaterialTemplate, { content: { ...query } })
      //   this.$message.success('保存成功！')
      // } catch (err) {
      //   this.$message.error(err.msg)
      // }
    },
    changeProvince (value) {
      this.form.city = ''
      this.form.region = ''
      this.citys = []
      this.areas = []
      this.getAddres('citys', value)
    },
    changeCity (value) {
      this.form.region = ''
      this.areas = []
      this.getAddres('areas', value)
    },
    handleChange(file, fileList) {
      
    },
    getUrl(data) {
      this.imgs = data;
    },
    
  },

};
</script>

<style lang="scss" scoped>
.bg {
  background-color: #f5f5f5;
  h1 {
    height: 170px;
    line-height: 170px;
    text-align: center;
    font-size: 36px;
  }
}
.content {
  width: 1600px;
  background-color: #fff;
  margin: 0 auto;
  padding: 25px 22px;
  h3 {
    color: #3e4373;
    font-size: 18px;
    height:50px;
    // line-height:75px;
    border-bottom: 1px solid #ededed;
    margin: 16px 0px;
  }
  .module {
    margin-top: 32px;
    .t-title {
      color: #b2b4c7;
      font-size: 18px;
      margin-bottom: 16px;
      display: flex;
      flex-direction: row;
      // justify-content: center;
      align-items: center;
      span.t-icon {
        width: 4px;
        height: 10px;
        background: #b2b4c7;
        border-radius: 8px;
        margin-right: 8px;
      }
      span.line {
        // width: 1350px;
        flex:1;
        height: 1px;
        background: #ededed;
        margin-left: 8px;
      }
    }
    .main {
      background: #f6f6f9;
      border-radius: 6px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      padding: 25px 22px;
      width: 1556px;
      height: auto;
      .el-form{
        width:100%;
        .radio-group{          
          .radio{
            margin-right:15px!important;
          }
        }
        .addName{
          border-radius: 4px;
          background:#FF708B;
          color:#fff;
        }
        .chooseBtn{
          background:#FF708B!important;
          color:#fff;
        }
        table{
          width:100%;
        }
        .header{
          background: #F8F7FC;
        }
        .flex{
          display:flex;          
          span{
            flex:1;
            border:1px solid #ccc;
            padding-left:24px;
            color: #64698F;
            font-weight: bold;
          }
          th,td{
            flex:1;
            border:none;
            color: #64698F;
          }
          th{
            border: 1px solid #ccc;
            padding-left:24px;
          }
          ul li{
            flex:1;
            border-radius:0;
            height:40px;
            line-height:40px;
            color:#C0C4CC;
            .clientInput {
              flex:1;
              height:40px;
              line-height:40px;
              border-radius:0!important;
              padding-left:24px;
              color:#C0C4CC;
            }
          }
        }
        .flex th{
          background: #F8F7FC;    
        }
        .brandNameList {
          display:flex;
          margin-top:15px;
          .nameList{
            padding: 0 10px;
            background: #F4F4F5;
            border: 1px solid #E9E9EB;
            box-sizing: border-box;
            border-radius: 4px;
            height:32px;
            line-height:32px;
            color: #C0C4CC;
            margin-left:5px;
          }
        }
        .el-form-upload-bd{
          background: #FFFFFF;
          border-radius: 4px;
          width: 1192px;
          padding:15px;
        }
        .flex{
          display:flex;
        }
        .el-date{
          width:100%;
        }
        .el-form-item__content{
          display:flex;
        }
        .el-form-select-bd {
          width:50%;
          display: flex;
          align-items: center;
          justify-content: space-between;
          float:left;
        }
        .el-form-select-item {
          width: 33%;
        }
        .el-form-select-textarea{
          width:50%;
          display: inline-block;
        }
        .row{
          display:flex;
          .el-form-item-t{
            width:50%;
          }
        }
        .el-form-item-tw{
          width:50%;
        }
        .el-form-item-one{
          width:100%;
        }
        .m-input{
          display: flex;
          flex-direction: row; 
          width: 1512px;
          height: 40px;
          line-height:40px;
          margin-top:22px;
          .title{
            width: 220px;
            font-size:14px;
            display: flex;
            flex-direction: row;
            justify-content: flex-end;
            align-items: flex-start;
            span.star{
              width: 7px;
              color: #F56C6C;
            }
          }
        }
      }      
    }
  }
}
.survey{
  .ali-upload{
    display: inline-block;
  }
  .survey-upload {
    position: relative;
    width: 100px;
    height: 100px;
    background: #fff;
    border: 1px dashed #DCDFE6;
    box-sizing: border-box;
    border-radius: 2px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    color: #B2B4C7;
  }
  .avatar{
    width:100px;
    height:100px;
    border-radius: 4px;
    margin-left:10px;
  }
}
.upload-footer {
  padding-top:32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  background: #FFFFFF;
  box-shadow: 0px -1px 0px 0px #D9D9D9;
  .upload-save {
    margin:32px 0;
    background:#FF708B;
    color:#fff;
  }
}
.el-form-item__label{
  line-height: 20px!important;
  height: 40px!important;
}
</style>